﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class GameplayPVEUIPveJoyStickWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Gameplay.PVE.UI.PveJoyStick);
			Utils.BeginObjectRegister(type, L, translator, 0, 9, 1, 1);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnDrag", _m_SetOnDrag);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnDragLua", _m_SetOnDragLua);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnTouchUp", _m_SetOnTouchUp);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnTouchStartLua", _m_SetOnTouchStartLua);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnPress", _m_SetOnPress);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetOnTouchDown", _m_SetOnTouchDown);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateJoystick", _m_UpdateJoystick);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetActive", _m_SetActive);
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "joyStick", _g_get_joyStick);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "joyStick", _s_set_joyStick);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Gameplay.PVE.UI.PveJoyStick();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Gameplay.PVE.UI.PveJoyStick constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Gameplay.PVE.UI.PveJoyStick();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Gameplay.PVE.UI.PveJoyStick constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Init(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<UnityEngine.Camera>(L, 2)) 
                {
                    UnityEngine.Camera _uiCamera = (UnityEngine.Camera)translator.GetObject(L, 2, typeof(UnityEngine.Camera));
                    
                    gen_to_be_invoked.Init( _uiCamera );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.Init(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Gameplay.PVE.UI.PveJoyStick.Init!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnDrag(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<UnityEngine.Vector2, float> _action = translator.GetDelegate<System.Action<UnityEngine.Vector2, float>>(L, 2);
                    
                    gen_to_be_invoked.SetOnDrag( _action );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnDragLua(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    XLua.LuaFunction _function = (XLua.LuaFunction)translator.GetObject(L, 2, typeof(XLua.LuaFunction));
                    
                    gen_to_be_invoked.SetOnDragLua( _function );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnTouchUp(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<UnityEngine.Vector2> _action = translator.GetDelegate<System.Action<UnityEngine.Vector2>>(L, 2);
                    
                    gen_to_be_invoked.SetOnTouchUp( _action );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnTouchStartLua(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    XLua.LuaFunction _function = (XLua.LuaFunction)translator.GetObject(L, 2, typeof(XLua.LuaFunction));
                    
                    gen_to_be_invoked.SetOnTouchStartLua( _function );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnPress(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action _action = translator.GetDelegate<System.Action>(L, 2);
                    float _cd = (float)LuaAPI.lua_tonumber(L, 3);
                    
                    gen_to_be_invoked.SetOnPress( _action, _cd );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetOnTouchDown(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Action<UnityEngine.Vector2> _action = translator.GetDelegate<System.Action<UnityEngine.Vector2>>(L, 2);
                    
                    gen_to_be_invoked.SetOnTouchDown( _action );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UpdateJoystick(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.UpdateJoystick(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetActive(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    bool _isActive = LuaAPI.lua_toboolean(L, 2);
                    
                    gen_to_be_invoked.SetActive( _isActive );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_joyStick(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.joyStick);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_joyStick(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Gameplay.PVE.UI.PveJoyStick gen_to_be_invoked = (Gameplay.PVE.UI.PveJoyStick)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.joyStick = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
